package day7.zuoye;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        int a[]=new int[15];
        int b=0;
        for(int i=0;i<a.length;i++){
            a[i]=(int)(Math.random()*100);
        }
        for (int ar:a){
            System.out.print(ar+"\t");

        }
        System.out.println();
        Scanner input =new Scanner(System.in);
        System.out.println("输入要查找的数");
        int k=input.nextInt();
        for (int i=0;i<a.length;i++){
            if (k==a[i]){
              b++;
            }
        }
        System.out.println("出现的次数是"+b);
    }
}
